import ConfigProvider from "antd/es/config-provider"
import locale from "antd/locale/zh_CN"
import type { ReactNode } from "react"

import "dayjs/locale/zh-cn"

export const ThemeProvider = ({ children = null as ReactNode }) => (
  <ConfigProvider
    theme={{
      token: {
        // colorPrimary: "#a1701d"
      },
      components: {
        Statistic: {
          contentFontSize: 12,
          titleFontSize: 12
        },
        Button: {
          fontSize: 12
        },
        Select: {
          optionFontSize: 12
        },
        Table: {
          cellFontSizeSM: 11
        }
      }
    }}
    locale={locale}>
    {children}
  </ConfigProvider>
)
